<?php

/**
 * 默认控制器
 */
class Controller_Test extends Controller_Abstract
{
    function actionIndex()
    {
        // 为 $this->_view 指定的值将会传递数据到视图中
		# $this->_view['text'] = 'Hello!';
		
    	$message = Helper_Swift::messager();
    	$mailer = Helper_Swift::mailer();
    	
    	// Create the message
		$message = Swift_Message::newInstance()
		
		  // Give the message a subject
		  ->setSubject('Your subject')
		
		  // Set the From address with an associative array
		  ->setFrom(array('suncitycsc@126.com' => 'John Doe'))
		
		  // Set the To addresses with an associative array
		  ->setTo(array('25848780@qq.com' => 'abc'))
		
		  // Give it a body
		  ->setBody('Here is the message itself')
		
		  // And optionally an alternative body
		  ->addPart('<q>Here is the message itself</q>', 'text/html')
		
		  // Optionally add any attachments
		  //->attach(Swift_Attachment::fromPath('my-document.pdf'))
		  ;
		  
		  $mailer->send($message);
    	
    }

	function actionLogin(){
	
	}

	function actionLogout(){
		

	}
}

